<HTML><HEAD><TITLE>current_record(?Key)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Recorded Database</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>current_record(?Key)</H1>
Succeeds if Key is the key of a recorded item.


<DL>
<DT><EM>Key</EM></DT>
<DD>Variable, atom, compound term, or handle.
</DD>
</DL>
<H2>Description</H2>
   Used to backtrack over the keys currently recorded in the indexed
   database.  Key must be either a variable, an atom or a compound term.
   In the case of compound terms, all keys of the same name and arity are
   treated as equal.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>current_record(+) is semidet
<LI>current_record(-) is nondet
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
Fails if Key is not a current key
<H3>Exceptions</H3>
<DL>
<DT><EM>(5) type error </EM>
<DD>Key is neither a variable, an atom nor a compound term.
</DL>
<H2>Examples</H2>
<PRE>
   Success:
   [eclipse]: record(whiskey,jameson),
   &gt;        record(whiskey,bushmills),
   &gt;        record(beer,lowenbrau),
   &gt;        record(car(bmw), 735).
   yes.
   [eclipse]: current_record(Key).
   Key = beer     More? (;)
   Key = whiskey     More? (;)
   Key = car(_g62)     More? (;)
   no (more) solution.
   Fail:
   record(whiskey,bushmills),current_record(bushmills).
   Error:
   current_record(1).                     (Error 5)
   current_record("whiskey").             (Error 5)



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/record/is_record-1.html">is_record / 1</A>
</BODY></HTML>
